package com.mywork;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

public class ListSort {
	public static void main(String[] args) {

		int i[] = { 6, 34, 2, 6, 43, 8, 5, 3, 0, 1 };
		List<Integer> list = new ArrayList<Integer>();
		for (int x : i) {
			list.add(x);
		}
		Comparator<Integer> c = new Comparator<Integer>() {

			@Override
			public int compare(Integer o1, Integer o2) {

				return o1 - o2 <= 0 ? -1 : 1;
			}

		};
		list.sort(c);
		System.out.println(list);
	}
}